package com.wang.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Classname CommonResult
 * @Description TODO
 * @Date 2024/10/8 14:24
 * @Created by pc
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class CommonResult<T> {
    private Integer code;// 状态码
    private String message; // 消息提示
    private T data; // 泛型 对应类型的数据

    // 手工定义一个不带数据的返回
    public CommonResult(Integer code, String message){
        this.code = code;
        this.message = message;
    }
}
